package com.common.util;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;

import java.util.Map;

/**
 * @author 大忽悠
 * @create 2022/10/10 20:53
 */
public class CustomBeanUtil {

    public static <T> T mapToBean(Map source,T type){
        return (T) BeanUtil.mapToBean(source, type.getClass(), true, CopyOptions.create().ignoreCase().ignoreNullValue());
    }
}
